#pragma once

#include "Vocoder.h"

class WaveletPitchProcessor;
class PitchOut;
class Sample;

/*
Storage of pitch analysis data
*/
class PitchAnalysis
{
public:
	PitchAnalysis(void){pitchOut=NULL;}
	~PitchAnalysis(void){}
	int frequency;
	bool voiced;
	PitchOut* pitchOut;
};

/*
Implementation of FrequencyProvider that uses wavelet analysis to provide the requested frequencies
*/
class PitchTracker : public FrequencyProvider
{
public:
	PitchTracker(const	unsigned	int	bufferSize,
				 const	unsigned	int	samplingFrequency);
	~PitchTracker(void);

	unsigned int GetFrequency(short* sample, unsigned int length, std::vector<SampleMarker>* markers);

	WaveletPitchProcessor* processor;
	int lastPitch;
};
